import request from '@/utils/request'

// 查询设备信息列表
export function listEquipmentInfo(query) {
  return request({
    url: '/business/equipmentInfo/list',
    method: 'get',
    params: query
  })
}

// 查询设备信息详细
export function getEquipmentInfo(equipmentInfoId) {
  return request({
    url: '/business/equipmentInfo/' + equipmentInfoId,
    method: 'get'
  })
}

// 新增设备信息
export function addEquipmentInfo(data) {
  return request({
    url: '/business/equipmentInfo',
    method: 'post',
    data: data
  })
}

// 修改设备信息
export function updateEquipmentInfo(equipmentInfoId, data) {
  return request({
    headers: {
      repeatSubmit: true,
      interval: 2000
    },
    url: '/business/equipmentInfo/' + equipmentInfoId,
    method: 'put',
    data: data
  })
}

// 删除设备信息
export function delEquipmentInfo(equipmentInfoId) {
  return request({
    url: '/business/equipmentInfo/' + equipmentInfoId,
    method: 'delete'
  })
}

// 导入信息列表
export function importEquipmentInfo(data) {
  return request({
    url: '/business/equipmentInfo/import',
    method: 'post',
    data: data
  })
}
